package com.chen.wow.day02.javaconfig;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;


@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes=StudentConfig.class)
public class TestStudentConfig {
	@Autowired
	private Student student;
	
	@Test
	public void play(){
		System.out.println(student.getName());
		Teacher teacher = student.getTeacher();
		Assert.assertEquals("大学老师", teacher.getName());
	}
}
